<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <h1></h1>
    <script>
        let h1=document.querySelector("h1")
        setInterval(() => {
            let timeNow=new Date();
            let hours=timeNow.getHours();
            let minutes=timeNow.getMinutes()
            let seconds=timeNow.getSeconds()
            let time=`${hours}:${minutes}:${seconds}`
            // console.log(time)
            h1.innerHTML=time
        }, 500);
    </script>
</body>
</html>